package com.zhisheng.core.utils;

import java.io.Closeable;
import java.io.IOException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class CloseUtils {
	private static final transient Log logger = LogFactory.getLog(CloseUtils.class);
	
	private CloseUtils() {}
	
	public static void close(Closeable... cs) {
		if(cs != null)
			try {
				for(Closeable c : cs)
					if(c != null)
						c.close();
			} catch (IOException e) {
				logger.error(e);
			}
	}
}
